wayland: Correctly find the keyboard for the keymap
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 5 Sep 2014 22:04:21 +0000 (15:04 -0700)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 5 Sep 2014 22:06:19 +0000 (15:06 -0700)
The list of devices was being scanned over incorrectly, causing us to
never actually fetch the keymap from the keyboard, as the keyboard was
the second device in the list, not the first.

This causes us to create a new temporary keymap every time, which is
quite expensive, because it involves parsing the entire XKB
file. Scanning the list correctly will cause us to use the XKB rules
file that was passed to us.

gdk/wayland/gdkdisplay-wayland.c

index ea701c852bf776efaf54a512017c0368949da414..dea982acd761ce47d2b542f287103df6dbbb015a 100644 (file)
@@ -514,7 +514,7 @@ _gdk_wayland_display_get_keymap (GdkDisplay *display)
   for (l = list; l; l = l->next)
     {
       GdkDevice *device;
-      device = list->data;
+      device = l->data;
 
       if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
        continue;